<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>Dynamic Table</title>


    <link href="/public/js/iCheck/skins/minimal/blue.css" rel="stylesheet">

    <!--dynamic table-->
    <link href="/public/js/advanced-datatable/css/demo_page.css" rel="stylesheet" />
    <link href="/public/js/advanced-datatable/css/demo_table.css" rel="stylesheet" />
    <link rel="stylesheet" href="/public/js/data-tables/DT_bootstrap.css" />
    <?php $this->load->view('library/header');?>
</head>
<style>
    .none{
        display: none;
    }
    .none:nth-child(1){
        display: block;
    }
    .none:nth-child(2){
        display: block;
    }
    .up-jia:hover .none{
        display: block;
    }
</style>
<body class="sticky-header">

<section>

    <?php $this->load->view('library/left');?>

    <!-- main content start-->
    <div class="main-content" >

        <?php $this->load->view('library/top');?>

        <!--body wrapper start-->
        <div class="wrapper">
            <div class="row">
                <div class="col-sm-12">
                    <?php $this->load->view('library/search');?>

                    <section class="panel">
                    	
                        <div class="panel-body">
                            <div class="adv-table">
                                <table class="display table table-bordered table-striped" id="dynamic-table">
                                    <thead>
                                    <tr>
                                        <th width="3%">编号</th>
                                        <th width="6%">图片</th>
                                        <th width="6%">SKU号</th>
                                        <th width="10%" class="center hidden-phone">下架原因</th>
                                        <th width="15%" class="hidden-phone">商品名称</th>
                                        <th width="10%" class="center hidden-phone">新老货</th>
                                        <th width="8%" class="hidden-phone">价钱</th>
                                        <th width="5%" class="hidden-phone">添加时间</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <?php foreach ($lower_shelf_sku as $item): ?>
                                        <tr class="gradeX">
                                            <td><?php echo $item['sku_id']?>
                                            </td>
                                            <td><img style="width: 120px;height: 120px;" src="<?php echo $item['original_img']?>" alt="">
                                            </td>
                                            <td><?php echo $item['sku_sn']?><br>
                                            	<?php echo $item['color']?> / 
                                            	<?php echo $item['size']?>
                                            </td>
                                            <td class="up-jia">
                                            	<?php if($item['reason'] == 1){
                                            		echo '缺货';
                                            	}elseif($item['reason'] == 2){
                                            		echo '断货';
                                            	}elseif($item['reason'] == 3){
                                            		echo '质检不合格';
                                            	}elseif($item['reason'] == 4){
                                            		echo '侵权';
                                            	}elseif($item['reason'] == 5){
                                            		echo '滞销';
                                            	}elseif($item['reason'] == 6){
                                            		echo '预售失败';
                                            	}else{echo '空';}?>
                                            </td>
                                            <td class="hidden-phone"><?php echo $item['goods_name']?>
                                            </td>
                                            <td class="hidden-phone"><?php echo $item['is_type']?>
                                            </td>
                                            <td class="center hidden-phone"><?php echo $item['shop_price']?>
                                            </td>
                                            <td class="hidden-phone"><?php echo date('Y-m-d H:i',$item['add_time'])?>
                                            </td>
                                        </tr>
                                    <?php endforeach;?>
                                    </tbody>
                                </table>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="dataTables_paginate paging_bootstrap pagination">
                                        <ul>
                                            <?php echo $pages;?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </div>

        <!--body wrapper end-->

        <!--footer section start-->
        <footer>
            2014 &copy; AdminEx by
        </footer>
    </div>
</section>
<?php $this->load->view('library/footer');?>
<script src="/public/js/iCheck/jquery.icheck.js"></script>
<script src="/public/js/icheck-init.js"></script>
<script src="/public/js/scripts.js"></script>
</body>
</html>
